#include "Scheme/GUIStateImagery.h"

namespace YGUI
{
    StateImagery::StateImagery(void)
    {
    }

    StateImagery::StateImagery(const String& name) : m_name(name)
    {
    }

    void StateImagery::render(Window& wnd, const ColourRect* modcolor/* = 0*/, const Rect<float>* clipper/* = 0*/) const
    {
        for(LayerList::const_iterator it = m_layers.begin(); it != m_layers.end(); ++it)
        {
            it->render(wnd, modcolor, clipper);
        }
    }

    void StateImagery::render(Window& wnd, const Rect<float>& base_rect, const ColourRect* modcolor/* = 0*/, const Rect<float>* clipper/* = 0*/) const
    {
        for(LayerList::const_iterator it = m_layers.begin(); it != m_layers.end(); ++it)
        {
            it->render(wnd, base_rect, modcolor, clipper);
        }
    }

    const String& StateImagery::getName(void) const
    {
        return m_name;
    }

    void StateImagery::addLayer(const LayerStandard& layer)
    {
        m_layers.insert(layer);
    }

    void StateImagery::clearLayer(void)
    {
        m_layers.clear();
    }
};